<?php 
class Gallery extends CI_Controller{
	public function __construct(){	
		parent::__construct();
        $this->load->helper(array('form', 'url'));
	}
	
	public function index(){
		$this->load->model("admin/mgallery");
		
		if($this->input->post("ok")){
				$this->mgallery->do_upload();
		}
		$data['images'] = $this->Mgallery->get_images();
		$this->load->view("gallery_view",$data);	
	}
}
